﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Survey.aspx.cs" Inherits="Touch2Like.Web.Touch2Rate.Survey" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script src="/js/bootstrap.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/js/rating.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/rating.css" />
    <style type="text/css">
        .btn[disabled]
        {
            opacity: .15;
        }
        legend
        {
            margin-bottom: 10px;
            font-size: 13px;
        }
        input[type="checkbox"]
        {
            display: none;
        }
        
        label.checkbox, label.radio
        {
            font-size: 16px;
            line-height: 22px;
            padding-left: 10px;
            margin-bottom: 10px;
        }
        
        input[type="checkbox"] + span
        {
            display: inline-block;
            width: 19px;
            height: 19px;
            margin: -1px 4px 0 0;
            vertical-align: middle;
            background: url(/img/check_radio_sheet.png) left top no-repeat;
            cursor: pointer;
        }
        
        input[type="checkbox"]:checked + span
        {
            background: url(/img/check_radio_sheet.png) -19px top no-repeat;
        }
        
        input[type="radio"]
        {
            display: none;
        }
        
        input[type="radio"] + span
        {
            display: inline-block;
            width: 19px;
            height: 19px;
            margin: -1px 4px 0 0;
            vertical-align: middle;
            background: url(/img/check_radio_sheet.png) -38px top no-repeat;
            cursor: pointer;
        }
        
        input[type="radio"]:checked + span
        {
            background: url(/img/check_radio_sheet.png) -57px top no-repeat;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $('.rating').rating();

            $('.ratingEvent').rating({ rateEnd: function (v) { $('#result').text(v); } });
        });

        function SubmitForm() {
            $("[qid]").each(function () {
                var qid = $(this).attr("qid");
                var v = "";
                if ($(this).hasClass("rbitems")) {
                    $(this).find(".radio").each(function () {
                        if ($(this).find(":radio").attr("checked")) v = $(this).text();
                    });
                } else if ($(this).hasClass("tbcomment")) {
                    v = $(this).find("textarea").val();
                } else if ($(this).hasClass("tbrate")) {
                    v = $(this).find(":text").val();
                } else if ($(this).hasClass("cbitems")) {
                    $(this).find(".checkbox").each(function () {
                        if ($(this).find(":checkbox").attr("checked")) v += $(this).text() + ",";
                    });
                }
                $(this).find(":hidden").val(v);
            });
        }
    </script>
</head>
<body>
    <div class="navbar navbar-static-top">
        <div class="navbar-inner">
            <div class="container">
                <a class="brand" href="#">
                    <img src="/img/logo.png" id="img_logo" runat="server" /></a>
            </div>
        </div>
    </div>
    <div class="container">
        <form class="form" id="form1" runat="server">
        <fieldset>
            <legend>Feedback - Powered By CAMINTEL</legend>
            <asp:Repeater ID="Repeater_Question" runat="server">
                <ItemTemplate>
                    <span class="help-block"><strong>
                        <%#Eval("Question") %></strong></span>
                    <div class="well well-small">
                        <%#Eval("QuestionItems")%>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
            <asp:Button ID="btn_Submit" runat="server" CssClass="btn btn-primary" Text="Submit"
                OnClick="btn_Submit_Click" OnClientClick="SubmitForm()" />
        </fieldset>
        </form>
    </div>
</body>
</html>
